home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Macintosh Drag and Drop / Demo Applications / DragsAndLists / ListCode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-04  |  1.4 KB  |  61 lines  |  [TEXT/MPS ]

  1. #ifndef __LISTCODE__
  2. #define __LISTCODE__
  3.  
  4.  
  5. #include <Lists.h>
  6. #include <Windows.h>
  7. #include <Events.h>
  8. #include <Drag.h>
  9.  
  10.  
  11.  
  12. // Utilities
  13.  
  14. void GlobalToLocalRect(Rect *r);
  15. void LocalToGlobalRect(Rect *r);
  16. void GetGlobalMouse(Point *mouse);
  17.  
  18. Boolean HandleListClick(WindowPtr win, EventRecord *event);
  19. void GetRectHeight(WindowPtr win, short rows, short *height);
  20. Boolean MouseHitSelection(ListHandle list, Point localPt);
  21. Boolean GetFirstSelection(ListHandle list, Cell *cell);
  22. void UpdateFrameList(ListHandle list);
  23. Boolean EqualCells(Cell c1, Cell c2);
  24. Boolean GetSelectionRect(ListHandle list, Rect *rct);
  25. Boolean MyClickLoop();
  26.  
  27.  
  28.  
  29. // Source list specific
  30.  
  31. void AddToSourceList(OSType theType);
  32. void BuildSourceList(WindowPtr win);
  33. void HandleClickInSourceList(WindowPtr win, 
  34.                 Boolean newClick, Boolean doubleClick, Cell nuCell);
  35. void UpdateSourceList();
  36.  
  37.  
  38. // Dest list specific
  39.  
  40. void AddToDestList(OSType theType);
  41. void BuildDestList(WindowPtr win);
  42. void HandleClickInDestList(WindowPtr win, 
  43.             Boolean newClick, Boolean doubleClick, Cell nuCell);
  44. void UpdateDestList();
  45. Boolean PtInDestList(Point localPt);
  46. void GetDestListRect(Rect *rct);
  47.  
  48.  
  49.  
  50. // Drag & Drop specific
  51.  
  52. #define myPersonalFlavorType 'Type'
  53.  
  54. OSErr StartADrag(ListHandle list, EventRecord *theEvent);
  55. OSErr AddFlavors(DragReference drag, ItemReference item,
  56.             ListHandle list);
  57. void OutlineRegion(RgnHandle theRgn);
  58.  
  59.  
  60.  
  61. #endif